import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

import baseRouters from '@/router/modules/baseRouters.js';
import otherRouters from '@/router/modules/otherRouters.js';
import sampleRouters from '@/router/modules/sampleRouters.js';

export const routes = [
  ...baseRouters, // 基础的路由
  ...otherRouters, // 常规页面的路由
  ...sampleRouters, // 例子的路由
];

export default new Router({
  mode: 'history', // 后端支持可开
  base: 'front', // 路由前缀，可根据实际项目修改，与/config/index.js设置保持一致
  scrollBehavior: () => ({ y: 0 }),
  routes
});
